package com.mj.mes.config;/**
 * @author cRyann
 * @create 2017-04-17 16:57
 **/

/**
 *
 * @author cRyann
 * @create 2017-04-17 16:57
 **/
//@Aspect
//@Component
public class LoggerAopConfig {
//    protected final Logger logger = LoggerFactory.getLogger(this.getClass());
//
//    @Pointcut("execution(public * com.mj.mes..*Service.*(..))")
//    public void excudeService(){}
//
//    @Before("execution(public * com.mj.mes..*Service.*(..))")
//    public void doBefore(JoinPoint joinPoint){
//        ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
//        if(attributes != null ){
//            HttpServletRequest request = attributes.getRequest();
//            logger.debug("URL : {}" , request.getRequestURL().toString());
//            logger.debug("ARGS : {}" ,Arrays.toString(joinPoint.getArgs()));
//            Enumeration<String> enu=request.getParameterNames();
//            while(enu.hasMoreElements()){
//                String paraName= enu.nextElement();
//                logger.debug("PARANAME :"+paraName+"= {}" , request.getParameter(paraName));
//            }
//        }
//    }
//    @Around("excudeService() || @annotation(checkPermission)")
//    public void doInterceptor(ProceedingJoinPoint pjp, CheckPermission checkPermission){
//        //执行过程中
//    }
//    @AfterReturning("excudeService()")
//    public void  doAfterReturning(JoinPoint joinPoint){
//        // 处理完请求，返回内容
//    }
}
